package drds.binlog.protocol.entry_protocol_proto;

/**
 * <pre>
 * *message row 每行变更数据的数据结构*
 * </pre>
 * <p>
 */
public final class RowChange extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange)
        RowChangeOrBuilder
{
    public static final int TABLEID_FIELD_NUMBER = 1;
    public static final int EVENTTYPE_FIELD_NUMBER = 2;
    public static final int ISDDL_FIELD_NUMBER = 10;
    public static final int SQL_FIELD_NUMBER = 11;
    public static final int ROWDATAS_FIELD_NUMBER = 12;
    public static final int PROPS_FIELD_NUMBER = 13;
    public static final int DDLSCHEMANAME_FIELD_NUMBER = 14;
    private static final long serialVersionUID = 0L;
    // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange)
    private static final RowChange DEFAULT_INSTANCE;
    private static final com.google.protobuf.Parser<RowChange>
            PARSER = new com.google.protobuf.AbstractParser<RowChange>()
    {
        @Override
        public RowChange parsePartialFrom(
                com.google.protobuf.CodedInputStream codedInputStream,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws com.google.protobuf.InvalidProtocolBufferException
        {
            return new RowChange(codedInputStream, extensionRegistry);
        }
    };

    static
    {
        DEFAULT_INSTANCE = new RowChange();
    }

    ;

    private int bitField0_;
    private int eventTypePresentCase_ = 0;
    private Object eventTypePresent_;
    private int isDdlPresentCase_ = 0;

    ;
    private Object isDdlPresent_;
    private long tableId_;
    private volatile Object sql_;
    private java.util.List<RowData> rowDataList;
    private java.util.List<Pair> props_;
    private volatile Object ddlSchemaName_;
    private byte memoizedIsInitialized = -1;

    // Use RowChange.newBuilder() to construct.
    private RowChange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
    {
        super(builder);
    }

    private RowChange()
    {
        tableId_ = 0L;
        sql_ = "";
        rowDataList = java.util.Collections.emptyList();
        props_ = java.util.Collections.emptyList();
        ddlSchemaName_ = "";
    }

    private RowChange(
            com.google.protobuf.CodedInputStream codedInputStream,
            com.google.protobuf.ExtensionRegistryLite extensionRegistryLite)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        this();
        if (extensionRegistryLite == null)
        {
            throw new NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
                com.google.protobuf.UnknownFieldSet.newBuilder();
        try
        {
            boolean done = false;
            while (!done)
            {
                int tag = codedInputStream.readTag();
                switch (tag)
                {
                    case 0:
                        done = true;
                        break;
                    case 8:
                    {

                        tableId_ = codedInputStream.readInt64();
                        break;
                    }
                    case 16:
                    {
                        int rawValue = codedInputStream.readEnum();
                        eventTypePresentCase_ = 2;
                        eventTypePresent_ = rawValue;
                        break;
                    }
                    case 80:
                    {
                        isDdlPresentCase_ = 10;
                        isDdlPresent_ = codedInputStream.readBool();
                        break;
                    }
                    case 90:
                    {
                        String s = codedInputStream.readStringRequireUtf8();

                        sql_ = s;
                        break;
                    }
                    case 98:
                    {
                        if (!((mutable_bitField0_ & 0x00000010) == 0x00000010))
                        {
                            rowDataList = new java.util.ArrayList<RowData>();
                            mutable_bitField0_ |= 0x00000010;
                        }
                        rowDataList.add(
                                codedInputStream.readMessage(RowData.parser(), extensionRegistryLite));
                        break;
                    }
                    case 106:
                    {
                        if (!((mutable_bitField0_ & 0x00000020) == 0x00000020))
                        {
                            props_ = new java.util.ArrayList<Pair>();
                            mutable_bitField0_ |= 0x00000020;
                        }
                        props_.add(
                                codedInputStream.readMessage(Pair.parser(), extensionRegistryLite));
                        break;
                    }
                    case 114:
                    {
                        String s = codedInputStream.readStringRequireUtf8();

                        ddlSchemaName_ = s;
                        break;
                    }
                    default:
                    {
                        if (!parseUnknownFieldProto3(
                                codedInputStream, unknownFields, extensionRegistryLite, tag))
                        {
                            done = true;
                        }
                        break;
                    }
                }
            }
        } catch (com.google.protobuf.InvalidProtocolBufferException e)
        {
            throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e)
        {
            throw new com.google.protobuf.InvalidProtocolBufferException(
                    e).setUnfinishedMessage(this);
        } finally
        {
            if (((mutable_bitField0_ & 0x00000010) == 0x00000010))
            {
                rowDataList = java.util.Collections.unmodifiableList(rowDataList);
            }
            if (((mutable_bitField0_ & 0x00000020) == 0x00000020))
            {
                props_ = java.util.Collections.unmodifiableList(props_);
            }
            this.unknownFields = unknownFields.build();
            makeExtensionsImmutable();
        }
    }

    public static final com.google.protobuf.Descriptors.Descriptor
    getDescriptor()
    {
        return BinlogEntry.protocol_RowChange_descriptor;
    }

    public static RowChange parseFrom(
            java.nio.ByteBuffer byteBuffer)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(byteBuffer);
    }

    public static RowChange parseFrom(
            java.nio.ByteBuffer data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static RowChange parseFrom(
            com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static RowChange parseFrom(
            com.google.protobuf.ByteString data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static RowChange parseFrom(byte[] data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static RowChange parseFrom(
            byte[] data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static RowChange parseFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static RowChange parseFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static RowChange parseDelimitedFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input);
    }

    public static RowChange parseDelimitedFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }

    public static RowChange parseFrom(
            com.google.protobuf.CodedInputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static RowChange parseFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Builder newBuilder()
    {
        return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(RowChange prototype)
    {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    public static RowChange getDefaultInstance()
    {
        return DEFAULT_INSTANCE;
    }

    public static com.google.protobuf.Parser<RowChange> parser()
    {
        return PARSER;
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields()
    {
        return this.unknownFields;
    }

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable()
    {
        return BinlogEntry.protocol_RowChange_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                        RowChange.class, Builder.class);
    }

    public EventTypePresentCase
    getEventTypePresentCase()
    {
        return EventTypePresentCase.forNumber(
                eventTypePresentCase_);
    }

    public IsDdlPresentCase
    getIsDdlPresentCase()
    {
        return IsDdlPresentCase.forNumber(
                isDdlPresentCase_);
    }

    /**
     * <pre>
     * *tableId,由数据库产生*
     * </pre>
     * <p>
     * <code>int64 tableId = 1;</code>
     */
    public long getTableId()
    {
        return tableId_;
    }

    /**
     * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
     */
    public int getEventTypeValue()
    {
        if (eventTypePresentCase_ == 2)
        {
            return (Integer) eventTypePresent_;
        }
        return 0;
    }

    /**
     * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
     */
    public EventType getEventType()
    {
        if (eventTypePresentCase_ == 2)
        {
            @SuppressWarnings("deprecation")
            EventType result = EventType.valueOf(
                    (Integer) eventTypePresent_);
            return result == null ? EventType.UNRECOGNIZED : result;
        }
        return EventType.UPDATE;
    }

    /**
     * <code>bool isDdl = 10;</code>
     */
    public boolean getIsDdl()
    {
        if (isDdlPresentCase_ == 10)
        {
            return (Boolean) isDdlPresent_;
        }
        return false;
    }

    /**
     * <pre>
     * * ddl/query的sql语句  *
     * </pre>
     * <p>
     * <code>string sql = 11;</code>
     */
    public String getSql()
    {
        Object ref = sql_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            sql_ = s;
            return s;
        }
    }

    /**
     * <pre>
     * * ddl/query的sql语句  *
     * </pre>
     * <p>
     * <code>string sql = 11;</code>
     */
    public com.google.protobuf.ByteString
    getSqlBytes()
    {
        Object ref = sql_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            sql_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    /**
     * <pre>
     * * 一次数据库变更可能存在多行  *
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
     */
    public java.util.List<RowData> getRowDatasList()
    {
        return rowDataList;
    }

    /**
     * <pre>
     * * 一次数据库变更可能存在多行  *
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
     */
    public java.util.List<? extends RowDataOrBuilder>
    getRowDatasOrBuilderList()
    {
        return rowDataList;
    }

    /**
     * <pre>
     * * 一次数据库变更可能存在多行  *
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
     */
    public int getRowDatasCount()
    {
        return rowDataList.size();
    }

    /**
     * <pre>
     * * 一次数据库变更可能存在多行  *
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
     */
    public RowData getRowDatas(int index)
    {
        return rowDataList.get(index);
    }

    /**
     * <pre>
     * * 一次数据库变更可能存在多行  *
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
     */
    public RowDataOrBuilder getRowDatasOrBuilder(
            int index)
    {
        return rowDataList.get(index);
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
     */
    public java.util.List<Pair> getPropsList()
    {
        return props_;
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
     */
    public java.util.List<? extends PairOrBuilder>
    getPropsOrBuilderList()
    {
        return props_;
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
     */
    public int getPropsCount()
    {
        return props_.size();
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
     */
    public Pair getProps(int index)
    {
        return props_.get(index);
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
     */
    public PairOrBuilder getPropsOrBuilder(
            int index)
    {
        return props_.get(index);
    }

    /**
     * <pre>
     * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
     * </pre>
     * <p>
     * <code>string ddlSchemaName = 14;</code>
     */
    public String getDdlSchemaName()
    {
        Object ref = ddlSchemaName_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            ddlSchemaName_ = s;
            return s;
        }
    }

    /**
     * <pre>
     * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
     * </pre>
     * <p>
     * <code>string ddlSchemaName = 14;</code>
     */
    public com.google.protobuf.ByteString
    getDdlSchemaNameBytes()
    {
        Object ref = ddlSchemaName_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            ddlSchemaName_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    @Override
    public final boolean isInitialized()
    {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
            throws java.io.IOException
    {
        if (tableId_ != 0L)
        {
            output.writeInt64(1, tableId_);
        }
        if (eventTypePresentCase_ == 2)
        {
            output.writeEnum(2, ((Integer) eventTypePresent_));
        }
        if (isDdlPresentCase_ == 10)
        {
            output.writeBool(
                    10, (boolean) ((Boolean) isDdlPresent_));
        }
        if (!getSqlBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 11, sql_);
        }
        for (int i = 0; i < rowDataList.size(); i++)
        {
            output.writeMessage(12, rowDataList.get(i));
        }
        for (int i = 0; i < props_.size(); i++)
        {
            output.writeMessage(13, props_.get(i));
        }
        if (!getDdlSchemaNameBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 14, ddlSchemaName_);
        }
        unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize()
    {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (tableId_ != 0L)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt64Size(1, tableId_);
        }
        if (eventTypePresentCase_ == 2)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeEnumSize(2, ((Integer) eventTypePresent_));
        }
        if (isDdlPresentCase_ == 10)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeBoolSize(
                            10, (boolean) ((Boolean) isDdlPresent_));
        }
        if (!getSqlBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, sql_);
        }
        for (int i = 0; i < rowDataList.size(); i++)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeMessageSize(12, rowDataList.get(i));
        }
        for (int i = 0; i < props_.size(); i++)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeMessageSize(13, props_.get(i));
        }
        if (!getDdlSchemaNameBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, ddlSchemaName_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
    }

    @Override
    public boolean equals(final Object obj)
    {
        if (obj == this)
        {
            return true;
        }
        if (!(obj instanceof RowChange))
        {
            return super.equals(obj);
        }
        RowChange other = (RowChange) obj;

        boolean result = true;
        result = result && (getTableId()
                == other.getTableId());
        result = result && getSql()
                .equals(other.getSql());
        result = result && getRowDatasList()
                .equals(other.getRowDatasList());
        result = result && getPropsList()
                .equals(other.getPropsList());
        result = result && getDdlSchemaName()
                .equals(other.getDdlSchemaName());
        result = result && getEventTypePresentCase().equals(
                other.getEventTypePresentCase());
        if (!result) return false;
        switch (eventTypePresentCase_)
        {
            case 2:
                result = result && getEventTypeValue()
                        == other.getEventTypeValue();
                break;
            case 0:
            default:
        }
        result = result && getIsDdlPresentCase().equals(
                other.getIsDdlPresentCase());
        if (!result) return false;
        switch (isDdlPresentCase_)
        {
            case 10:
                result = result && (getIsDdl()
                        == other.getIsDdl());
                break;
            case 0:
            default:
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
    }

    @Override
    public int hashCode()
    {
        if (memoizedHashCode != 0)
        {
            return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + TABLEID_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
                getTableId());
        hash = (37 * hash) + SQL_FIELD_NUMBER;
        hash = (53 * hash) + getSql().hashCode();
        if (getRowDatasCount() > 0)
        {
            hash = (37 * hash) + ROWDATAS_FIELD_NUMBER;
            hash = (53 * hash) + getRowDatasList().hashCode();
        }
        if (getPropsCount() > 0)
        {
            hash = (37 * hash) + PROPS_FIELD_NUMBER;
            hash = (53 * hash) + getPropsList().hashCode();
        }
        hash = (37 * hash) + DDLSCHEMANAME_FIELD_NUMBER;
        hash = (53 * hash) + getDdlSchemaName().hashCode();
        switch (eventTypePresentCase_)
        {
            case 2:
                hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER;
                hash = (53 * hash) + getEventTypeValue();
                break;
            case 0:
            default:
        }
        switch (isDdlPresentCase_)
        {
            case 10:
                hash = (37 * hash) + ISDDL_FIELD_NUMBER;
                hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
                        getIsDdl());
                break;
            case 0:
            default:
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
    }

    @Override
    public Builder newBuilderForType()
    {
        return newBuilder();
    }

    @Override
    public Builder toBuilder()
    {
        return this == DEFAULT_INSTANCE
                ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
            BuilderParent parent)
    {
        Builder builder = new Builder(parent);
        return builder;
    }

    @Override
    public com.google.protobuf.Parser<RowChange> getParserForType()
    {
        return PARSER;
    }

    @Override
    public RowChange getDefaultInstanceForType()
    {
        return DEFAULT_INSTANCE;
    }

    public enum EventTypePresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        EVENTTYPE(2),
        EVENTTYPEPRESENT_NOT_SET(0);
        private final int value;

        private EventTypePresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static EventTypePresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static EventTypePresentCase forNumber(int value)
        {
            switch (value)
            {
                case 2:
                    return EVENTTYPE;
                case 0:
                    return EVENTTYPEPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    public enum IsDdlPresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        ISDDL(10),
        ISDDLPRESENT_NOT_SET(0);
        private final int value;

        private IsDdlPresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static IsDdlPresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static IsDdlPresentCase forNumber(int value)
        {
            switch (value)
            {
                case 10:
                    return ISDDL;
                case 0:
                    return ISDDLPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    /**
     * <pre>
     * *message row 每行变更数据的数据结构*
     * </pre>
     * <p>
     * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange}
     */
    public static final class Builder extends
            com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
            // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowChange)
            RowChangeOrBuilder
    {
        private int eventTypePresentCase_ = 0;
        private Object eventTypePresent_;
        private int isDdlPresentCase_ = 0;
        private Object isDdlPresent_;
        private int bitField0_;
        private long tableId_;
        private Object sql_ = "";
        private java.util.List<RowData> rowDatas_ =
                java.util.Collections.emptyList();
        private com.google.protobuf.RepeatedFieldBuilderV3<
                RowData, RowData.Builder, RowDataOrBuilder> rowDatasBuilder_;
        private java.util.List<Pair> props_ =
                java.util.Collections.emptyList();
        private com.google.protobuf.RepeatedFieldBuilderV3<
                Pair, Pair.Builder, PairOrBuilder> propsBuilder_;
        private Object ddlSchemaName_ = "";

        // Construct using BinlogEntry.RowChange.newBuilder()
        private Builder()
        {
            maybeForceBuilderInitialization();
        }

        private Builder(
                BuilderParent parent)
        {
            super(parent);
            maybeForceBuilderInitialization();
        }

        public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor()
        {
            return BinlogEntry.protocol_RowChange_descriptor;
        }

        @Override
        protected FieldAccessorTable
        internalGetFieldAccessorTable()
        {
            return BinlogEntry.protocol_RowChange_fieldAccessorTable
                    .ensureFieldAccessorsInitialized(
                            RowChange.class, Builder.class);
        }

        private void maybeForceBuilderInitialization()
        {
            if (com.google.protobuf.GeneratedMessageV3
                    .alwaysUseFieldBuilders)
            {
                getRowDatasFieldBuilder();
                getPropsFieldBuilder();
            }
        }

        @Override
        public Builder clear()
        {
            super.clear();
            tableId_ = 0L;

            sql_ = "";

            if (rowDatasBuilder_ == null)
            {
                rowDatas_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000010);
            } else
            {
                rowDatasBuilder_.clear();
            }
            if (propsBuilder_ == null)
            {
                props_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000020);
            } else
            {
                propsBuilder_.clear();
            }
            ddlSchemaName_ = "";

            eventTypePresentCase_ = 0;
            eventTypePresent_ = null;
            isDdlPresentCase_ = 0;
            isDdlPresent_ = null;
            return this;
        }

        @Override
        public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType()
        {
            return BinlogEntry.protocol_RowChange_descriptor;
        }

        @Override
        public RowChange getDefaultInstanceForType()
        {
            return RowChange.getDefaultInstance();
        }

        @Override
        public RowChange build()
        {
            RowChange result = buildPartial();
            if (!result.isInitialized())
            {
                throw newUninitializedMessageException(result);
            }
            return result;
        }

        @Override
        public RowChange buildPartial()
        {
            RowChange result = new RowChange(this);
            int from_bitField0_ = bitField0_;
            int to_bitField0_ = 0;
            result.tableId_ = tableId_;
            if (eventTypePresentCase_ == 2)
            {
                result.eventTypePresent_ = eventTypePresent_;
            }
            if (isDdlPresentCase_ == 10)
            {
                result.isDdlPresent_ = isDdlPresent_;
            }
            result.sql_ = sql_;
            if (rowDatasBuilder_ == null)
            {
                if (((bitField0_ & 0x00000010) == 0x00000010))
                {
                    rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_);
                    bitField0_ = (bitField0_ & ~0x00000010);
                }
                result.rowDataList = rowDatas_;
            } else
            {
                result.rowDataList = rowDatasBuilder_.build();
            }
            if (propsBuilder_ == null)
            {
                if (((bitField0_ & 0x00000020) == 0x00000020))
                {
                    props_ = java.util.Collections.unmodifiableList(props_);
                    bitField0_ = (bitField0_ & ~0x00000020);
                }
                result.props_ = props_;
            } else
            {
                result.props_ = propsBuilder_.build();
            }
            result.ddlSchemaName_ = ddlSchemaName_;
            result.bitField0_ = to_bitField0_;
            result.eventTypePresentCase_ = eventTypePresentCase_;
            result.isDdlPresentCase_ = isDdlPresentCase_;
            onBuilt();
            return result;
        }

        @Override
        public Builder clone()
        {
            return (Builder) super.clone();
        }

        @Override
        public Builder setField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.setField(field, value);
        }

        @Override
        public Builder clearField(
                com.google.protobuf.Descriptors.FieldDescriptor field)
        {
            return (Builder) super.clearField(field);
        }

        @Override
        public Builder clearOneof(
                com.google.protobuf.Descriptors.OneofDescriptor oneof)
        {
            return (Builder) super.clearOneof(oneof);
        }

        @Override
        public Builder setRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                int index, Object value)
        {
            return (Builder) super.setRepeatedField(field, index, value);
        }

        @Override
        public Builder addRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.addRepeatedField(field, value);
        }

        @Override
        public Builder mergeFrom(com.google.protobuf.Message other)
        {
            if (other instanceof RowChange)
            {
                return mergeFrom((RowChange) other);
            } else
            {
                super.mergeFrom(other);
                return this;
            }
        }

        public Builder mergeFrom(RowChange other)
        {
            if (other == RowChange.getDefaultInstance()) return this;
            if (other.getTableId() != 0L)
            {
                setTableId(other.getTableId());
            }
            if (!other.getSql().isEmpty())
            {
                sql_ = other.sql_;
                onChanged();
            }
            if (rowDatasBuilder_ == null)
            {
                if (!other.rowDataList.isEmpty())
                {
                    if (rowDatas_.isEmpty())
                    {
                        rowDatas_ = other.rowDataList;
                        bitField0_ = (bitField0_ & ~0x00000010);
                    } else
                    {
                        ensureRowDatasIsMutable();
                        rowDatas_.addAll(other.rowDataList);
                    }
                    onChanged();
                }
            } else
            {
                if (!other.rowDataList.isEmpty())
                {
                    if (rowDatasBuilder_.isEmpty())
                    {
                        rowDatasBuilder_.dispose();
                        rowDatasBuilder_ = null;
                        rowDatas_ = other.rowDataList;
                        bitField0_ = (bitField0_ & ~0x00000010);
                        rowDatasBuilder_ =
                                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                                        getRowDatasFieldBuilder() : null;
                    } else
                    {
                        rowDatasBuilder_.addAllMessages(other.rowDataList);
                    }
                }
            }
            if (propsBuilder_ == null)
            {
                if (!other.props_.isEmpty())
                {
                    if (props_.isEmpty())
                    {
                        props_ = other.props_;
                        bitField0_ = (bitField0_ & ~0x00000020);
                    } else
                    {
                        ensurePropsIsMutable();
                        props_.addAll(other.props_);
                    }
                    onChanged();
                }
            } else
            {
                if (!other.props_.isEmpty())
                {
                    if (propsBuilder_.isEmpty())
                    {
                        propsBuilder_.dispose();
                        propsBuilder_ = null;
                        props_ = other.props_;
                        bitField0_ = (bitField0_ & ~0x00000020);
                        propsBuilder_ =
                                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                                        getPropsFieldBuilder() : null;
                    } else
                    {
                        propsBuilder_.addAllMessages(other.props_);
                    }
                }
            }
            if (!other.getDdlSchemaName().isEmpty())
            {
                ddlSchemaName_ = other.ddlSchemaName_;
                onChanged();
            }
            switch (other.getEventTypePresentCase())
            {
                case EVENTTYPE:
                {
                    setEventTypeValue(other.getEventTypeValue());
                    break;
                }
                case EVENTTYPEPRESENT_NOT_SET:
                {
                    break;
                }
            }
            switch (other.getIsDdlPresentCase())
            {
                case ISDDL:
                {
                    setIsDdl(other.getIsDdl());
                    break;
                }
                case ISDDLPRESENT_NOT_SET:
                {
                    break;
                }
            }
            this.mergeUnknownFields(other.unknownFields);
            onChanged();
            return this;
        }

        @Override
        public final boolean isInitialized()
        {
            return true;
        }

        @Override
        public Builder mergeFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws java.io.IOException
        {
            RowChange parsedMessage = null;
            try
            {
                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e)
            {
                parsedMessage = (RowChange) e.getUnfinishedMessage();
                throw e.unwrapIOException();
            } finally
            {
                if (parsedMessage != null)
                {
                    mergeFrom(parsedMessage);
                }
            }
            return this;
        }

        public EventTypePresentCase
        getEventTypePresentCase()
        {
            return EventTypePresentCase.forNumber(
                    eventTypePresentCase_);
        }

        public Builder clearEventTypePresent()
        {
            eventTypePresentCase_ = 0;
            eventTypePresent_ = null;
            onChanged();
            return this;
        }

        public IsDdlPresentCase
        getIsDdlPresentCase()
        {
            return IsDdlPresentCase.forNumber(
                    isDdlPresentCase_);
        }

        public Builder clearIsDdlPresent()
        {
            isDdlPresentCase_ = 0;
            isDdlPresent_ = null;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *tableId,由数据库产生*
         * </pre>
         * <p>
         * <code>int64 tableId = 1;</code>
         */
        public long getTableId()
        {
            return tableId_;
        }

        /**
         * <pre>
         * *tableId,由数据库产生*
         * </pre>
         * <p>
         * <code>int64 tableId = 1;</code>
         */
        public Builder setTableId(long value)
        {

            tableId_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *tableId,由数据库产生*
         * </pre>
         * <p>
         * <code>int64 tableId = 1;</code>
         */
        public Builder clearTableId()
        {

            tableId_ = 0L;
            onChanged();
            return this;
        }

        /**
         * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
         */
        public int getEventTypeValue()
        {
            if (eventTypePresentCase_ == 2)
            {
                return ((Integer) eventTypePresent_).intValue();
            }
            return 0;
        }

        /**
         * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
         */
        public Builder setEventTypeValue(int value)
        {
            eventTypePresentCase_ = 2;
            eventTypePresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
         */
        public EventType getEventType()
        {
            if (eventTypePresentCase_ == 2)
            {
                @SuppressWarnings("deprecation")
                EventType result = EventType.valueOf(
                        (Integer) eventTypePresent_);
                return result == null ? EventType.UNRECOGNIZED : result;
            }
            return EventType.EVENTTYPECOMPATIBLEPROTO2;
        }

        /**
         * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
         */
        public Builder setEventType(EventType value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            eventTypePresentCase_ = 2;
            eventTypePresent_ = value.getNumber();
            onChanged();
            return this;
        }

        /**
         * <code>.com.alibaba.otter.canal.protocol.EventType eventType = 2;</code>
         */
        public Builder clearEventType()
        {
            if (eventTypePresentCase_ == 2)
            {
                eventTypePresentCase_ = 0;
                eventTypePresent_ = null;
                onChanged();
            }
            return this;
        }

        /**
         * <code>bool isDdl = 10;</code>
         */
        public boolean getIsDdl()
        {
            if (isDdlPresentCase_ == 10)
            {
                return (Boolean) isDdlPresent_;
            }
            return false;
        }

        /**
         * <code>bool isDdl = 10;</code>
         */
        public Builder setIsDdl(boolean value)
        {
            isDdlPresentCase_ = 10;
            isDdlPresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>bool isDdl = 10;</code>
         */
        public Builder clearIsDdl()
        {
            if (isDdlPresentCase_ == 10)
            {
                isDdlPresentCase_ = 0;
                isDdlPresent_ = null;
                onChanged();
            }
            return this;
        }

        /**
         * <pre>
         * * ddl/query的sql语句  *
         * </pre>
         * <p>
         * <code>string sql = 11;</code>
         */
        public String getSql()
        {
            Object ref = sql_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                sql_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <pre>
         * * ddl/query的sql语句  *
         * </pre>
         * <p>
         * <code>string sql = 11;</code>
         */
        public Builder setSql(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            sql_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * ddl/query的sql语句  *
         * </pre>
         * <p>
         * <code>string sql = 11;</code>
         */
        public com.google.protobuf.ByteString
        getSqlBytes()
        {
            Object ref = sql_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                sql_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <pre>
         * * ddl/query的sql语句  *
         * </pre>
         * <p>
         * <code>string sql = 11;</code>
         */
        public Builder setSqlBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            sql_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * ddl/query的sql语句  *
         * </pre>
         * <p>
         * <code>string sql = 11;</code>
         */
        public Builder clearSql()
        {

            sql_ = getDefaultInstance().getSql();
            onChanged();
            return this;
        }

        private void ensureRowDatasIsMutable()
        {
            if (!((bitField0_ & 0x00000010) == 0x00000010))
            {
                rowDatas_ = new java.util.ArrayList<RowData>(rowDatas_);
                bitField0_ |= 0x00000010;
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public java.util.List<RowData> getRowDatasList()
        {
            if (rowDatasBuilder_ == null)
            {
                return java.util.Collections.unmodifiableList(rowDatas_);
            } else
            {
                return rowDatasBuilder_.getMessageList();
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public int getRowDatasCount()
        {
            if (rowDatasBuilder_ == null)
            {
                return rowDatas_.size();
            } else
            {
                return rowDatasBuilder_.getCount();
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public RowData getRowDatas(int index)
        {
            if (rowDatasBuilder_ == null)
            {
                return rowDatas_.get(index);
            } else
            {
                return rowDatasBuilder_.getMessage(index);
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder setRowDatas(
                int index, RowData value)
        {
            if (rowDatasBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensureRowDatasIsMutable();
                rowDatas_.set(index, value);
                onChanged();
            } else
            {
                rowDatasBuilder_.setMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder setRowDatas(
                int index, RowData.Builder builderForValue)
        {
            if (rowDatasBuilder_ == null)
            {
                ensureRowDatasIsMutable();
                rowDatas_.set(index, builderForValue.build());
                onChanged();
            } else
            {
                rowDatasBuilder_.setMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder addRowDatas(RowData value)
        {
            if (rowDatasBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensureRowDatasIsMutable();
                rowDatas_.add(value);
                onChanged();
            } else
            {
                rowDatasBuilder_.addMessage(value);
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder addRowDatas(
                int index, RowData value)
        {
            if (rowDatasBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensureRowDatasIsMutable();
                rowDatas_.add(index, value);
                onChanged();
            } else
            {
                rowDatasBuilder_.addMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder addRowDatas(
                RowData.Builder builderForValue)
        {
            if (rowDatasBuilder_ == null)
            {
                ensureRowDatasIsMutable();
                rowDatas_.add(builderForValue.build());
                onChanged();
            } else
            {
                rowDatasBuilder_.addMessage(builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder addRowDatas(
                int index, RowData.Builder builderForValue)
        {
            if (rowDatasBuilder_ == null)
            {
                ensureRowDatasIsMutable();
                rowDatas_.add(index, builderForValue.build());
                onChanged();
            } else
            {
                rowDatasBuilder_.addMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder addAllRowDatas(
                Iterable<? extends RowData> values)
        {
            if (rowDatasBuilder_ == null)
            {
                ensureRowDatasIsMutable();
                com.google.protobuf.AbstractMessageLite.Builder.addAll(
                        values, rowDatas_);
                onChanged();
            } else
            {
                rowDatasBuilder_.addAllMessages(values);
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder clearRowDatas()
        {
            if (rowDatasBuilder_ == null)
            {
                rowDatas_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000010);
                onChanged();
            } else
            {
                rowDatasBuilder_.clear();
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public Builder removeRowDatas(int index)
        {
            if (rowDatasBuilder_ == null)
            {
                ensureRowDatasIsMutable();
                rowDatas_.remove(index);
                onChanged();
            } else
            {
                rowDatasBuilder_.remove(index);
            }
            return this;
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public RowData.Builder getRowDatasBuilder(
                int index)
        {
            return getRowDatasFieldBuilder().getBuilder(index);
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public RowDataOrBuilder getRowDatasOrBuilder(
                int index)
        {
            if (rowDatasBuilder_ == null)
            {
                return rowDatas_.get(index);
            } else
            {
                return rowDatasBuilder_.getMessageOrBuilder(index);
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public java.util.List<? extends RowDataOrBuilder>
        getRowDatasOrBuilderList()
        {
            if (rowDatasBuilder_ != null)
            {
                return rowDatasBuilder_.getMessageOrBuilderList();
            } else
            {
                return java.util.Collections.unmodifiableList(rowDatas_);
            }
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public RowData.Builder addRowDatasBuilder()
        {
            return getRowDatasFieldBuilder().addBuilder(
                    RowData.getDefaultInstance());
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public RowData.Builder addRowDatasBuilder(
                int index)
        {
            return getRowDatasFieldBuilder().addBuilder(
                    index, RowData.getDefaultInstance());
        }

        /**
         * <pre>
         * * 一次数据库变更可能存在多行  *
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;</code>
         */
        public java.util.List<RowData.Builder>
        getRowDatasBuilderList()
        {
            return getRowDatasFieldBuilder().getBuilderList();
        }

        private com.google.protobuf.RepeatedFieldBuilderV3<
                RowData, RowData.Builder, RowDataOrBuilder>
        getRowDatasFieldBuilder()
        {
            if (rowDatasBuilder_ == null)
            {
                rowDatasBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
                        RowData, RowData.Builder, RowDataOrBuilder>(
                        rowDatas_,
                        ((bitField0_ & 0x00000010) == 0x00000010),
                        getParentForChildren(),
                        isClean());
                rowDatas_ = null;
            }
            return rowDatasBuilder_;
        }

        private void ensurePropsIsMutable()
        {
            if (!((bitField0_ & 0x00000020) == 0x00000020))
            {
                props_ = new java.util.ArrayList<Pair>(props_);
                bitField0_ |= 0x00000020;
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public java.util.List<Pair> getPropsList()
        {
            if (propsBuilder_ == null)
            {
                return java.util.Collections.unmodifiableList(props_);
            } else
            {
                return propsBuilder_.getMessageList();
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public int getPropsCount()
        {
            if (propsBuilder_ == null)
            {
                return props_.size();
            } else
            {
                return propsBuilder_.getCount();
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Pair getProps(int index)
        {
            if (propsBuilder_ == null)
            {
                return props_.get(index);
            } else
            {
                return propsBuilder_.getMessage(index);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder setProps(
                int index, Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.set(index, value);
                onChanged();
            } else
            {
                propsBuilder_.setMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder setProps(
                int index, Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.set(index, builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.setMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder addProps(Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.add(value);
                onChanged();
            } else
            {
                propsBuilder_.addMessage(value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder addProps(
                int index, Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.add(index, value);
                onChanged();
            } else
            {
                propsBuilder_.addMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder addProps(
                Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.add(builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.addMessage(builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder addProps(
                int index, Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.add(index, builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.addMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder addAllProps(
                Iterable<? extends Pair> values)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                com.google.protobuf.AbstractMessageLite.Builder.addAll(
                        values, props_);
                onChanged();
            } else
            {
                propsBuilder_.addAllMessages(values);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder clearProps()
        {
            if (propsBuilder_ == null)
            {
                props_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000020);
                onChanged();
            } else
            {
                propsBuilder_.clear();
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Builder removeProps(int index)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.remove(index);
                onChanged();
            } else
            {
                propsBuilder_.remove(index);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Pair.Builder getPropsBuilder(
                int index)
        {
            return getPropsFieldBuilder().getBuilder(index);
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public PairOrBuilder getPropsOrBuilder(
                int index)
        {
            if (propsBuilder_ == null)
            {
                return props_.get(index);
            } else
            {
                return propsBuilder_.getMessageOrBuilder(index);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public java.util.List<? extends PairOrBuilder>
        getPropsOrBuilderList()
        {
            if (propsBuilder_ != null)
            {
                return propsBuilder_.getMessageOrBuilderList();
            } else
            {
                return java.util.Collections.unmodifiableList(props_);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Pair.Builder addPropsBuilder()
        {
            return getPropsFieldBuilder().addBuilder(
                    Pair.getDefaultInstance());
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public Pair.Builder addPropsBuilder(
                int index)
        {
            return getPropsFieldBuilder().addBuilder(
                    index, Pair.getDefaultInstance());
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 13;</code>
         */
        public java.util.List<Pair.Builder>
        getPropsBuilderList()
        {
            return getPropsFieldBuilder().getBuilderList();
        }

        private com.google.protobuf.RepeatedFieldBuilderV3<
                Pair, Pair.Builder, PairOrBuilder>
        getPropsFieldBuilder()
        {
            if (propsBuilder_ == null)
            {
                propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
                        Pair, Pair.Builder, PairOrBuilder>(
                        props_,
                        ((bitField0_ & 0x00000020) == 0x00000020),
                        getParentForChildren(),
                        isClean());
                props_ = null;
            }
            return propsBuilder_;
        }

        /**
         * <pre>
         * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
         * </pre>
         * <p>
         * <code>string ddlSchemaName = 14;</code>
         */
        public String getDdlSchemaName()
        {
            Object ref = ddlSchemaName_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                ddlSchemaName_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <pre>
         * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
         * </pre>
         * <p>
         * <code>string ddlSchemaName = 14;</code>
         */
        public Builder setDdlSchemaName(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            ddlSchemaName_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
         * </pre>
         * <p>
         * <code>string ddlSchemaName = 14;</code>
         */
        public com.google.protobuf.ByteString
        getDdlSchemaNameBytes()
        {
            Object ref = ddlSchemaName_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                ddlSchemaName_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <pre>
         * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
         * </pre>
         * <p>
         * <code>string ddlSchemaName = 14;</code>
         */
        public Builder setDdlSchemaNameBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            ddlSchemaName_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * ddl/query的schemaName，会存在跨库ddl，需要保留执行ddl的当前schemaName  *
         * </pre>
         * <p>
         * <code>string ddlSchemaName = 14;</code>
         */
        public Builder clearDdlSchemaName()
        {

            ddlSchemaName_ = getDefaultInstance().getDdlSchemaName();
            onChanged();
            return this;
        }

        @Override
        public final Builder setUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.setUnknownFieldsProto3(unknownFields);
        }

        @Override
        public final Builder mergeUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowChange)
    }

}
